<template>
	<div>
		<h3>子组件02</h3>
    <button @click="sendMsg">发送消息给父组件</button>
	</div>
</template>

<script>
	export default {
		name:'child2-component',
		data(){
			return {
				msg:'来自子组件02的消息'
			}
		},
    methods:{
      sendMsg(){
        this.$emit('sendMsg',this.msg)
      }
    }
	}
</script>

<style>
</style>